package com.example.testproject.domain;


//第三方代理-静态
public class ProxyClass implements CakeMachine{
    private CakeMachine cakeMachine;
    //构造方法传递参数-CakeMathine和它的实现类
    public ProxyClass(CakeMachine cakeMachine) {
        this.cakeMachine = cakeMachine;
    }

    @Override
    public void makeCake() {
        cakeMachine.makeCake();

        //业务拓展
        System.out.println("add a piece of meat on it");
    }
}
